package org.adream.account.dao;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.adream.account.entity.RoleEntity;
import org.adream.account.model.UserRoleResModel;
import org.apache.ibatis.annotations.Param;

@BaseMybatisDao
public interface RoleDao {
	int addRole(RoleEntity role);

	int deleteRole(RoleEntity role);

	int updateRole(RoleEntity role);

	List<RoleEntity> queryRolesByDr(@Param("dr") int dr);
	
	List<RoleEntity> queryRolesByVerifyAndDr(@Param("verify") Integer verify,@Param("dr") Integer dr);

	RoleEntity queryRoleByRleId(String rleId);
	
	RoleEntity queryRoleByRleName(String rleName);

	RoleEntity queryRoleByRleIdAndDr(@Param("rleId") String rleId, @Param("dr") int dr);

	ArrayList<RoleEntity> queryRoleByUid(@Param("uid") String uid);
	
	List<RoleEntity> selectPageRoles(@Param("dr") Integer dr);
	
	UserRoleResModel queryRleResByRleId(@Param("rleId") String rleId, @Param("dr") Integer dr);
	
	List<RoleEntity> queryRolesByDrAndUid(@Param("dr") Integer dr, @Param("uid") String uid);

	List<Map<String, Object>> getSysRoleInfo();
}
